home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_400
/
428_02
/
examples
/
center.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-13
|
518b
|
30 lines
/*
** CENTER.C: Displays a message centered on the screen.
*/
#include <string.h>
#include <pictor.h>
char *msg = "Hello, from the PICTOR library!";
void main()
{
VIDEOSTRUCT vstruct;
/* initialize library */
initvideo();
getvconfig(&vstruct);
vcolor(foreback(BOLD+WHITE,BLUE));
cls();
setvpos(center(1,vstruct.rows),
center(strlen(msg),vstruct.columns));
vputs(msg);
kbdread();
/* restore screen */
vcolor(foreback(WHITE,BLACK));
cls();
}